(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

a(h, h, h, x) → s(x)
a(l, x, s(y), h) → a(l, x, y, s(h))
a(l, x, s(y), s(z)) → a(l, x, y, a(l, x, s(y), z))
a(l, s(x), h, z) → a(l, x, z, z)
a(s(l), h, h, z) → a(l, z, h, z)
+(x, h) → x
+(h, x) → x
+(s(x), s(y)) → s(s(+(x, y)))
+(+(x, y), z) → +(x, +(y, z))
s(h) → 1
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h, h), l))

Rewrite Strategy: INNERMOST

(1) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(2) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

a(h, h, h, x) → s(x)
a(l, x, s(y), h) → a(l, x, y, s(h))
a(l, x, s(y), s(z)) → a(l, x, y, a(l, x, s(y), z))
a(l, s(x), h, z) → a(l, x, z, z)
a(s(l), h, h, z) → a(l, z, h, z)
+'(x, h) → x
+'(h, x) → x
+'(s(x), s(y)) → s(s(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
s(h) → 1'
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h, h), l))

S is empty.
Rewrite Strategy: INNERMOST

(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(4) Obligation:

Innermost TRS:
Rules:
a(h, h, h, x) → s(x)
a(l, x, s(y), h) → a(l, x, y, s(h))
a(l, x, s(y), s(z)) → a(l, x, y, a(l, x, s(y), z))
a(l, s(x), h, z) → a(l, x, z, z)
a(s(l), h, h, z) → a(l, z, h, z)
+'(x, h) → x
+'(h, x) → x
+'(s(x), s(y)) → s(s(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
s(h) → 1'
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h, h), l))

Types:
a :: h:1' → h:1' → h:1' → h:1' → h:1'
h :: h:1'
s :: h:1' → h:1'
+' :: h:1' → h:1' → h:1'
1' :: h:1'
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: h:1' → nil:cons → nil:cons
sum :: nil:cons → nil:cons
hole_h:1'1_0 :: h:1'
hole_nil:cons2_0 :: nil:cons
gen_nil:cons3_0 :: Nat → nil:cons

(5) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
a, +', app, sum

They will be analysed ascendingly in the following order:
a < sum

(6) Obligation:

Innermost TRS:
Rules:
a(h, h, h, x) → s(x)
a(l, x, s(y), h) → a(l, x, y, s(h))
a(l, x, s(y), s(z)) → a(l, x, y, a(l, x, s(y), z))
a(l, s(x), h, z) → a(l, x, z, z)
a(s(l), h, h, z) → a(l, z, h, z)
+'(x, h) → x
+'(h, x) → x
+'(s(x), s(y)) → s(s(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
s(h) → 1'
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h, h), l))

Types:
a :: h:1' → h:1' → h:1' → h:1' → h:1'
h :: h:1'
s :: h:1' → h:1'
+' :: h:1' → h:1' → h:1'
1' :: h:1'
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: h:1' → nil:cons → nil:cons
sum :: nil:cons → nil:cons
hole_h:1'1_0 :: h:1'
hole_nil:cons2_0 :: nil:cons
gen_nil:cons3_0 :: Nat → nil:cons

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(h, gen_nil:cons3_0(x))

The following defined symbols remain to be analysed:
a, +', app, sum

They will be analysed ascendingly in the following order:
a < sum

(7) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol a.

(8) Obligation:

Innermost TRS:
Rules:
a(h, h, h, x) → s(x)
a(l, x, s(y), h) → a(l, x, y, s(h))
a(l, x, s(y), s(z)) → a(l, x, y, a(l, x, s(y), z))
a(l, s(x), h, z) → a(l, x, z, z)
a(s(l), h, h, z) → a(l, z, h, z)
+'(x, h) → x
+'(h, x) → x
+'(s(x), s(y)) → s(s(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
s(h) → 1'
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h, h), l))

Types:
a :: h:1' → h:1' → h:1' → h:1' → h:1'
h :: h:1'
s :: h:1' → h:1'
+' :: h:1' → h:1' → h:1'
1' :: h:1'
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: h:1' → nil:cons → nil:cons
sum :: nil:cons → nil:cons
hole_h:1'1_0 :: h:1'
hole_nil:cons2_0 :: nil:cons
gen_nil:cons3_0 :: Nat → nil:cons

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(h, gen_nil:cons3_0(x))

The following defined symbols remain to be analysed:
+', app, sum

(9) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol +'.

(10) Obligation:

Innermost TRS:
Rules:
a(h, h, h, x) → s(x)
a(l, x, s(y), h) → a(l, x, y, s(h))
a(l, x, s(y), s(z)) → a(l, x, y, a(l, x, s(y), z))
a(l, s(x), h, z) → a(l, x, z, z)
a(s(l), h, h, z) → a(l, z, h, z)
+'(x, h) → x
+'(h, x) → x
+'(s(x), s(y)) → s(s(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
s(h) → 1'
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h, h), l))

Types:
a :: h:1' → h:1' → h:1' → h:1' → h:1'
h :: h:1'
s :: h:1' → h:1'
+' :: h:1' → h:1' → h:1'
1' :: h:1'
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: h:1' → nil:cons → nil:cons
sum :: nil:cons → nil:cons
hole_h:1'1_0 :: h:1'
hole_nil:cons2_0 :: nil:cons
gen_nil:cons3_0 :: Nat → nil:cons

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(h, gen_nil:cons3_0(x))

The following defined symbols remain to be analysed:
app, sum

(11) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
app(gen_nil:cons3_0(n170_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n170_0, b)), rt ∈ Ω(1 + n1700)

Induction Base:
app(gen_nil:cons3_0(0), gen_nil:cons3_0(b)) →RΩ(1)
gen_nil:cons3_0(b)

Induction Step:
app(gen_nil:cons3_0(+(n170_0, 1)), gen_nil:cons3_0(b)) →RΩ(1)
cons(h, app(gen_nil:cons3_0(n170_0), gen_nil:cons3_0(b))) →IH
cons(h, gen_nil:cons3_0(+(b, c171_0)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(12) Complex Obligation (BEST)

(13) Obligation:

Innermost TRS:
Rules:
a(h, h, h, x) → s(x)
a(l, x, s(y), h) → a(l, x, y, s(h))
a(l, x, s(y), s(z)) → a(l, x, y, a(l, x, s(y), z))
a(l, s(x), h, z) → a(l, x, z, z)
a(s(l), h, h, z) → a(l, z, h, z)
+'(x, h) → x
+'(h, x) → x
+'(s(x), s(y)) → s(s(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
s(h) → 1'
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h, h), l))

Types:
a :: h:1' → h:1' → h:1' → h:1' → h:1'
h :: h:1'
s :: h:1' → h:1'
+' :: h:1' → h:1' → h:1'
1' :: h:1'
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: h:1' → nil:cons → nil:cons
sum :: nil:cons → nil:cons
hole_h:1'1_0 :: h:1'
hole_nil:cons2_0 :: nil:cons
gen_nil:cons3_0 :: Nat → nil:cons

Lemmas:
app(gen_nil:cons3_0(n170_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n170_0, b)), rt ∈ Ω(1 + n1700)

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(h, gen_nil:cons3_0(x))

The following defined symbols remain to be analysed:
sum

(14) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol sum.

(15) Obligation:

Innermost TRS:
Rules:
a(h, h, h, x) → s(x)
a(l, x, s(y), h) → a(l, x, y, s(h))
a(l, x, s(y), s(z)) → a(l, x, y, a(l, x, s(y), z))
a(l, s(x), h, z) → a(l, x, z, z)
a(s(l), h, h, z) → a(l, z, h, z)
+'(x, h) → x
+'(h, x) → x
+'(s(x), s(y)) → s(s(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
s(h) → 1'
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h, h), l))

Types:
a :: h:1' → h:1' → h:1' → h:1' → h:1'
h :: h:1'
s :: h:1' → h:1'
+' :: h:1' → h:1' → h:1'
1' :: h:1'
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: h:1' → nil:cons → nil:cons
sum :: nil:cons → nil:cons
hole_h:1'1_0 :: h:1'
hole_nil:cons2_0 :: nil:cons
gen_nil:cons3_0 :: Nat → nil:cons

Lemmas:
app(gen_nil:cons3_0(n170_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n170_0, b)), rt ∈ Ω(1 + n1700)

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(h, gen_nil:cons3_0(x))

No more defined symbols left to analyse.

(16) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
app(gen_nil:cons3_0(n170_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n170_0, b)), rt ∈ Ω(1 + n1700)

(17) BOUNDS(n^1, INF)

(18) Obligation:

Innermost TRS:
Rules:
a(h, h, h, x) → s(x)
a(l, x, s(y), h) → a(l, x, y, s(h))
a(l, x, s(y), s(z)) → a(l, x, y, a(l, x, s(y), z))
a(l, s(x), h, z) → a(l, x, z, z)
a(s(l), h, h, z) → a(l, z, h, z)
+'(x, h) → x
+'(h, x) → x
+'(s(x), s(y)) → s(s(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
s(h) → 1'
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h, h), l))

Types:
a :: h:1' → h:1' → h:1' → h:1' → h:1'
h :: h:1'
s :: h:1' → h:1'
+' :: h:1' → h:1' → h:1'
1' :: h:1'
app :: nil:cons → nil:cons → nil:cons
nil :: nil:cons
cons :: h:1' → nil:cons → nil:cons
sum :: nil:cons → nil:cons
hole_h:1'1_0 :: h:1'
hole_nil:cons2_0 :: nil:cons
gen_nil:cons3_0 :: Nat → nil:cons

Lemmas:
app(gen_nil:cons3_0(n170_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n170_0, b)), rt ∈ Ω(1 + n1700)

Generator Equations:
gen_nil:cons3_0(0) ⇔ nil
gen_nil:cons3_0(+(x, 1)) ⇔ cons(h, gen_nil:cons3_0(x))

No more defined symbols left to analyse.

(19) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
app(gen_nil:cons3_0(n170_0), gen_nil:cons3_0(b)) → gen_nil:cons3_0(+(n170_0, b)), rt ∈ Ω(1 + n1700)

(20) BOUNDS(n^1, INF)